<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <input type="text" name="emailcode">
    <a href="#" id="getCode">获取验证码</a>
</div>
<script>
    document.getElementById("getCode").addEventListener("clicks",function (e) {
       var  email=document.getElementById("email").value;
        fetch("/senfmail?email="+email);
    })
</script>
</body>
</html>